package com.java.comprehensive.arithmetic.leecode.easy;

/**
 * @Author: 窦绍飞
 * @Date: 2022/6/14
 */
public class LeetCode_136 {
	public static int singleNumber(int[] nums) {
		int temp = 0;
		for (int num : nums) {
			temp ^= num;
		}
		return temp;
	}

	public static void main(String[] args) {
		int[] nums = {4, 1, 2, 1, 2};
		int i = singleNumber(nums);
		System.out.println(i);
	}
}
